package com.msdemo.zuul;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.ConfigurableEnvironment;
import org.apache.http.conn.ssl.NoopHostnameVerifier;

/**
* @comments
* @author zg
* @date 2017年9月28日
*/
@EnableZuulProxy
@EnableEurekaClient
@SpringBootApplication
public class MicroSrvDemoZuulServer {
	private static Class<?> cla =  MicroSrvDemoZuulServer.class;
	private static Logger logger = LogManager.getLogger(cla);
	
	public static void main(String[] args) {
		ConfigurableApplicationContext cofigAppCont = SpringApplication.run(cla, args);
		ConfigurableEnvironment confEnv = cofigAppCont.getEnvironment();
		String appName = confEnv.getProperty("spring.application.name");
		int port = Integer.valueOf(confEnv.getProperty("server.port"));
		logger.info("MicroSrvDemoZuulServer started on {}:{}, appName:{}  >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>", port, appName);

	}

}
